Skip to main content

Load Balancer

<Proxy "balancer://cluster">
BalancerMember "http://<server 1>"
BalancerMember "http://<server 2>"
</Proxy>
ProxyPass "/" "balancer://cluster/"
ProxyPassReverse "/" "balancer://cluster/"

Ref: Reverse Proxy Guide

Ref: Apache Module mod_proxy_balancer

Sticky session

Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/" env=BALANCER_ROUTE_CHANGED
<Proxy "balancer://cluster">
BalancerMember "http://<server 1>" route=1
BalancerMember "http://<server 2>" route=2
</Proxy>
ProxyPass "/" "balancer://cluster/"
ProxyPassReverse "/" "balancer://cluster/"